package com.junzhiit.nengji.cms.web.util.erpt;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ApiConstants {
	
	//param name
	public static final String CLIENT_ID_PARAM_NAME="client_id";
	public static final String SIGN_PARAM_NAME="sign";
	public static final String TIMESTAMP_PARAM_NAME="timestamp";
	public static final String ID_PARAM_NAME="id";
	public static final String GRANT_TYPE_PARAM_NAME="grant_type";
	public static final String SCOPE_PARAM_NAME="scope";
	public static final String REFRESH_TOKEN_PARAM_NAME="refresh_token";
	public static final String MACHINE_CODE_PARAM_NAME="machine_code";
	public static final String MSIGN_PARAM_NAME="msign";
	public static final String ACCESS_TOKEN_PARAM_NAME="access_token";
	public static final String CONTENT_PARAM_NAME="content";
	public static final String ORIGIN_ID_PARAM_NAME="origin_id";
	public static final String IMG_URL_PARAM_NAME="img_url";
	public static final String PHONE_PARAM_NAME="phone";
	public static final String PRINT_NAME_PARAM_NAME="print_name";
	public static final String ISFILE_PARAM_NAME="is_file";
	public static final String AID_PARAM_NAME="aid";
	public static final String VOICE_PARAM_NAME="voice";
	public static final String RESPONSE_TYPE_PARAM_NAME="response_type";
	
	
	//request url
	public static String ACCESS_TOKEN_URL="https://open-api.10ss.net/oauth/oauth";
	public static String ADD_PRINTER_URL="https://open-api.10ss.net/printer/addprinter";
	public static String SEND_PRINT_URL="https://open-api.10ss.net/print/index";
	public static String PRINTER_STATUS_URL="https://open-api.10ss.net/printer/getprintstatus";
	public static String SET_PRINT_ICON_URL="https://open-api.10ss.net/printer/seticon";
	public static String CANCEL_PRINT_ICON_URL="https://open-api.10ss.net/printer/deleteicon";
	public static String SET_VOICE_URL="https://open-api.10ss.net/printer/setvoice";
	public static String CANCEL_VOICE_URL="https://open-api.10ss.net/printer/deletevoice";
	public static String SET_SOUND_URL="https://open-api.10ss.net/printer/setsound";
	public static String SHUTDOWN_RESTART_URL="https://open-api.10ss.net/printer/shutdownrestart";
	
	
	//param value
	public static String CLIENT_ID;
	public static String CLIENT_SECRET;
	public static String GRANT_TYPE="client_credentials";
	public static String SCOPE="all";
	
	
	@Value("${printer.client.id}")
	public void setCLIENT_ID(String clientId) {
		ApiConstants.CLIENT_ID = clientId;
	}

	@Value("${printer.client.secret}")
	public void setCLIENT_SECRET(String clientSecret) {
		ApiConstants.CLIENT_SECRET = clientSecret;
	}
	
	
	
	
	

}
